package com.sven.helloconsumer;


import com.sven.helloapi.User;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class HelloFeginServiceFallbackFactory implements FallbackFactory<HelloFeginService> {
    @Override
    public HelloFeginService create(Throwable throwable) {
        return new HelloFeginService() {
            @Override
            public String hello1() {
                return "降级了-HelloFeginServiceFallbackFactory";
            }

            @Override
            public String hello6(String name) {
                return null;
            }

            @Override
            public User hello7(String name, Integer age) {
                return null;
            }

            @Override
            public String hello8(User user) {
                return null;
            }
        };
    }
}
